#include "bonecoelfoismalia.h"
#include <GL/gl.h>
#include <GL/glu.h>
#include <gllib/Objects.h>

void BonecoElfoIsmalia::draw()
{
    //Cabeça

    glPushMatrix();
    glColor3f(1.0,1.0,1.0);
    glTranslatef(0.0, 1.0, 0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibSphere(0.1,10.0);
    glPopMatrix();

    //Chapéu pontudo

    glPushMatrix();
    glColor3f(0.0,1.0,0.0);
    glTranslatef(0.0, 1.18, -0.05);
    glRotatef(-15.0,1.0,0.0,0.0);
    glScalef(1.0, 1.0, 1.0);
    gllibCone(0.1,0.3,10.0);
    glPopMatrix();

    //Olho direito

    glPushMatrix();
    glColor3f(0.0,0.0,0.0);
    glTranslatef(0.05, 1.0, 0.085);
    glRotatef(90.0,1.0,0.0,0.0);
    glScalef(0.15, 0.15, 0.7);
    gllibCube(0.05);
    glPopMatrix();

    //Olho esquerdo

    glPushMatrix();
    glColor3f(0.0,0.0,0.0);
    glTranslatef(-0.05, 1.0, 0.085);
    glRotatef(90.0,1.0,0.0,0.0);
    glScalef(0.15, 0.15, 0.7);
    gllibCube(0.05);
    glPopMatrix();

    //Boca

    glPushMatrix();
    glColor3f(0.0,0.0,0.0);
    glTranslatef(0.0, 0.95, 0.086);
    glRotatef(90.0,0.0,1.0,0.0);
    glScalef(0.15, 0.15, 0.7);
    gllibCube(0.05);
    glPopMatrix();

    //Corpo

    glPushMatrix();
    glColor3f(0.5,1.0,0.2);
    glTranslatef(0.0, 0.78, 0.0);
    glScalef(1.0, 1.0, 0.6);
    gllibSphere(0.15,10.0);
    glPopMatrix();

    //Cinto

    glPushMatrix();
    glColor3f(0.5,0.4,0.3);
    glTranslatef(0.0, 0.75, 0.0);
    glScalef(1.0, 1.0, 0.6);
    gllibCylinder(0.15,0.05,10.0);
    glPopMatrix();

    //Braço direito

    glPushMatrix();
    glColor3f(1.0,1.0,1.0);
    glTranslatef(0.17, 0.8, 0.0);
    glRotatef(45.0,0.0,0.0,1.0);
    glScalef(0.3, 1.0, 0.3);
    gllibSphere(0.07,10.0);
    glPopMatrix();

    //Braço esquerdo

    glPushMatrix();
    glColor3f(1.0,1.0,1.0);
    glTranslatef(-0.17, 0.8, 0.0);
    glRotatef(-45.0,0.0,0.0,1.0);
    glScalef(0.3, 1.0, 0.3);
    gllibSphere(0.07,10.0);
    glPopMatrix();

    //Perna direita

    glPushMatrix();
    glColor3f(1.0,1.0,1.0);
    glTranslatef(0.05, 0.675, 0.1);
    glRotatef(90.0,1.0,0.0,0.0);
    glScalef(0.3, 1.1, 0.3);
    gllibSphere(0.07,10.0);
    glPopMatrix();

    //Perna esquerda

    glPushMatrix();
    glColor3f(1.0,1.0,1.0);
    glTranslatef(-0.05, 0.675, 0.1);
    glRotatef(90.0,1.0,0.0,0.0);
    glScalef(0.3, 1.1, 0.3);
    gllibSphere(0.07,10.0);
    glPopMatrix();

}
